{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from scipy.stats import poisson  # 导入泊松分布的实例\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "plt.rcParams['figure.figsize']=(15,5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "mu1,mu2=1,10  #设置相关参数，即泊松分布中的参数lambda"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA3sAAAFdCAYAAAC6p3ThAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3X28HWV97/3PVxNACWrUKAcCBo9W4sMpSqyKoMhtbSsqD629I9VTNTSl9RFpbz32nB7t7amtLdZaKxqtoGKp1mBvUQR7egclpbYEweeHVqMSamhEiwJVJPzOHzNbFou9s2evrL139qzP+/Wa1+y55jfXuq49YV/81sxck6pCkiRJktQvd1vsBkiSJEmSxs9kT5IkSZJ6yGRPkiRJknrIZE+SJEmSeshkT5IkSZJ6yGRPkiRJknrIZE+SJEmSeshkT5IkSZJ6yGRPEy/JVUk+M1T2yCS3JfnZaeKvSPKjJJ9Ksmah2tlHSU5OcmuShy52WyRpkjkWLg2Om5orkz0tGUnuleT2JDWw/CDJNUk2jljncuARwFVDu94I/H1V/e00h50NvAd4HPBbo3zu3kjy35L8dZKvt7+Db4xQx92SnJnky0l+mOTaJGcnOXBv4+cSW1V/A3wO+MO59kGSJpFjYWOuY+Fcx729rWO+xlnHTc1Vqmqx2yB1kuR4YAvwfuAjbfEhwEuA1cDGqnrHCPUeANxWVbe1208ArgBOrqr/b4ZjlgHfAz5fVU+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dAzNQXoo9Kcq95aqq0ZJjsSQvvngM/7576oareALyJZtaxnxqIydDxtw387DMJkqS+WDPw800zBbWmkrp7ckeCOHhcgCPG0yxp6TLZkxbe4KxiP5kRN8nzgCuBj1fVn+7h+MFZdH8w5rZJkrRYpv0ydAaDX3wun6HcL0Q18Uz2pIX3NWDqlQkHwU+e2dtEM2B9JMnw1bxBU7el7KqqWaejliRpiZj2y9AZTCWGBXxjhuP8QlQTz2RPWmBVdTOwrd38T+36QcAB7c/vpnkx7M3t9k8lecxAFQ9o15+cz3ZKkrTA7vJl6JDBZ9gPadefqKpdA+VTX4jeDnx9vM2Tlh6TPWlxvKddP6JdXwN8CLgF2AG8Avgj4D+A1W3ZlCPb9bvnv5mSJC2MGb4MHbQ2ycr27pdTaMbIVwzFTH0henVVzfbcn9R7JnvS4ngnzesVTgSoqtur6tSqOrCqTqqq7VX12qq6Z1U9qaoGZyV7GvCPVXXRdBVLkrSEDX8ZCs2dLqcBvwX8DU1CeDPwlKq6euh4vxCVBqSZvVbSQkvyZODjwGOq6gsdj3kKzcvX11XVV+azfZIkLbQk+wNfAb5RVcePcPwlwFrgYVX1wzE3T1pyvLInLZKq+gTNS1/fnOSes8UneQDwB8CJJnqSpD6qqh8Bvwo8IckjZosflOShwJOB/2qiJzW8sictsiQPB55WVW+aJe7VwHur6tqFaZkkSYsjybOBM4BnVtUtHeIPpLnz5e1V9YH5bp+0VJjsSZIkaZ/T9cvQNvYlwN9V1Rfnv2XS0mGyJ0mSJEk95DN7kiRJktRDJnuSJEmS1EMme5IkSZLUQyZ7kiRJktRDJnuSJEmS1EP/BxwGTBUbCO6UAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 1080x360 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fontdict = {'family': 'Times New Roman', 'weight': 'normal', 'size': 18}\n",
    "x1 = np.arange(poisson.ppf(0,mu1),\n",
    "             poisson.ppf(0.99,mu1)+1)\n",
    "ax1=plt.subplot(121)\n",
    "#ax1.plot(x1,binom.pmf(x1,n,p1),'bo',ms=1)\n",
    "ax1.vlines(x1, 0, poisson.pmf(x1,mu1), colors='b', lw=10, alpha=1)\n",
    "ax1.set_xlim((-0.9,30))\n",
    "ax1.set_ylim((0,0.4))\n",
    "ax1.xaxis.set_major_locator(plt.MultipleLocator(5.0))\n",
    "ax1.set_xlabel('(a)',fontdict=fontdict)\n",
    "ax1.tick_params(labelsize=15)\n",
    "ax1.set_title(r'$Poi(\\lambda=1.000)$',fontdict=fontdict)\n",
    "\n",
    "x2 = np.arange(poisson.ppf(0,mu2),\n",
    "             poisson.ppf(0.99,mu2)+1)\n",
    "ax2=plt.subplot(122)\n",
    "#ax2.plot(x2,binom.pmf(x2,n,p2),'bo',ms=1)\n",
    "ax2.vlines(x2, 0, poisson.pmf(x2, mu2), colors='b', lw=10, alpha=1)\n",
    "ax2.set_xlim((-0.9,30))\n",
    "ax2.set_ylim((0,0.14))\n",
    "ax2.xaxis.set_major_locator(plt.MultipleLocator(5.0))\n",
    "ax2.set_xlabel('(b)',fontdict=fontdict)\n",
    "ax2.tick_params(labelsize=15)\n",
    "ax2.set_title(r'$Poi(\\lambda=10.000)$',fontdict=fontdict)\n",
    "\n",
    "labels = ax1.get_xticklabels() + ax1.get_yticklabels()+ax2.get_xticklabels() + ax2.get_yticklabels()\n",
    "temp=[label.set_fontname('Times New Roman') for label in labels]\n",
    "plt.savefig('1.png')  # 将图片保存到当前目录，文件名为1.png"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
